import Vue from 'vue'
import Router from 'vue-router'
import whx from './profile/whx'
import Login from './lgx'
import {categoryRouters} from './category/category'
import homeRoute from './home/index'
import cartCount from './cart/cart'
import category from '@/views/category/category'
Vue.use(Router)

const originalPush = Router.prototype.push

Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
export default new Router({
  routes: [
    ...cartCount,
    ...categoryRouters,
    ...whx,
    ...Login,
    ...homeRoute
   
    
  ],
  mode:'history'
})
